<?php
class View_Administration_Module_Edit_Files extends View_Administration_Module_Edit
{
	public function buildContent( $moduleId )
	{
		$words	= $this->words['module']['editModuleFiles'];
		$module	= Logic_Module::getConfig( $moduleId );
		$formData	= $module['files'];
		$formData['classes']	= implode( "\n", $formData['classes'] );
		$formData['forms']		= implode( "\n", $formData['forms'] );
		$formData['html']		= implode( "\n", $formData['html'] );
		$formData['languages']	= implode( "\n", $formData['languages'] );
		$formData['templates']	= implode( "\n", $formData['templates'] );
		$formData['images']		= implode( "\n", $formData['images'] );
		$ui	= array(
			'words'		=> $words,
			'form'		=> $this->buildForm(
				'administration.module',
				'editModuleFiles',
				'module',
				'editModuleFiles',
				$formData
			),
			'form.tag'		=> $this->html->Form(
				'editModuleFiles',
				self::getUrl( array( 'moduleId' => $moduleId, 'action' => 'editModule' ) ).'#files-container'
			),
			'buttonCancel'	=> $this->html->LinkButton(
				self::getUrl( array( 'moduleId' => $moduleId ) ),
				$words['buttonCancel'],
				'but cancel'
			),
			'buttonSave'	=> $this->html->Button(
				'editModuleFiles',
				$words['buttonSave'],
				'but edit'
			),
		);
		return $this->loadTemplate( 'administration.module.edit.files', $ui );
	}
}
?>
